package com.bwsoft.util;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class PropertiesUtil {

	
	/**
	 * 读取properties文件
	 * @param key
	 * @return
	 */
	public static String getParam(String key,String filePath) {
		String param = "";
		Properties prop = new Properties();
		InputStream in = Object.class.getResourceAsStream(filePath);
		try {
			prop.load(in);
			param = prop.getProperty(key).trim();
		} catch (IOException e) {
			e.printStackTrace();
		}
		return param;
	}

}
